Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Wrong class for the clear button slot #946

Merged
merged 1 commit into from
Jul 18, 2024

Conversation

Tsuyoshi84
Copy link
Contributor

Describe your changes

Because the old class, dp__clear_icon, was still applied to the parent element of the clear button slot, the clear button was misplaced in the field.

This PR fixes the class so the button is positioned correctly.

Here are the results:

Before fix

image

After fix

image

The code
<template>
    <div class="wrapper">
        <Datepicker v-model="selectedDate" placeholder="Select Date" clearable>
            <template #clear-icon="{ clear }">
                <div class="clear" @click="clear">⭐</div>
            </template>
        </Datepicker>
    </div>
</template>

<script lang="ts" setup>
    import { ref } from 'vue';
    import Datepicker from '../src/VueDatePicker/VueDatePicker.vue';

    const selectedDate = ref();
</script>

<style lang="scss">
    @import 'src/VueDatePicker/style/main';
    .wrapper {
        padding: 200px;
    }

    .clear {
        margin: 4px 8px;
    }
</style>

Issue ticket number and link

#945

Checklist before requesting a review

  • I have performed a self-review of my code
  • I have ensured that unit tests pass without errors
  • If it is a new feature, I have added a new unit test

@Jasenkoo Jasenkoo merged commit f7e7f75 into Vuepic:main Jul 18, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants